{% extends 'admin/base_site.html' %}
{% load suit_tags admin_static %}

{# Switch for demonstration purposes, not indended for production use #}
{% block usertools %}
    {% with suit_layout='layout'|suit_conf:request %}
        {% if suit_layout == 'horizontal' %}
            <a href="{% url 'admin:index' %}?__suit_layout=vertical" class="demo-layout-switch">切换到纵向菜单</a>
        {% else %}
            <a href="{% url 'admin:index' %}?__suit_layout=horizontal" class="demo-layout-switch">切换到横向菜单</a>
        {% endif %}
        {{ block.super }}
    {% endwith %}

    <style type="text/css">
        body #header a.demo-layout-switch {
            color: #687086;
        }
        body.suit_layout_vertical .demo-layout-switch {
            background-color: #383D4B;
            order: 10;
            text-align: center;
            padding: .5rem 0;
        }
    </style>
{% endblock %}